/*
 *  Copyright (C) 2009 Dominik Psenner
 * 
 *   This file is part of WebDAV4JD.
 *
 *  WebDAV4JD is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  WebDAV4JD is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with project-blog.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package com.lab9.webdav4jd.core;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

/**
 * @author dominik
 * 
 */
public class HttpHeader {
	
	private final String name;
	private final List<String> value;
	
	private HttpHeader(final String name) {
		this.name = name;
		this.value = new LinkedList<String>();
	}
	
	/**
	 * @param name
	 * @param value
	 */
	public HttpHeader(final String name, final String value) {
		this(name);
		this.value.add(value);
	}
	
	/**
	 * @param name
	 * @param value
	 */
	public HttpHeader(final String name, final String... value) {
		this(name);
		for (final String v : value) {
			this.value.add(v);
		}
	}
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * @return the value
	 */
	public List<String> getValue() {
		return Collections.unmodifiableList(value);
	}
	
}
